'use strict';
	angular.module('accounting.accountCaptionList', ['app.services'])

	.controller('accountCaptionListCtrl'
			,['$rootScope', '$scope', 'BizData'
	        , f])//控制器结束
	function f($rootScope,$scope, BizData
	          ) {
		
  		var Model = this;
   		
  		Model.refresh = function(){
  			Model.dataMaster.refreshData();
  		};
  		
   		var options = {};
		options.container = Model;
		options.concept = 'AccountCaption';
		options.name = 'dataMaster';
		options.url = $rootScope.path;
		options.httpUrl = $rootScope.getServiceName();
   		options.creater = '';
   		options.reader = '/accounting/accountCaption/tree/query';
   		options.writer = '';
   		options.deleter = '';
   		options.idColumnDefine = "fID";
   		options.idColumnName = "fID";
   		options.defCols = {fID:{name:"fID",type:"String",label:""},systemCode:{name:"systemCode",type:"String",label:""},billType:{name:"billType",type:"String",label:""},billTypeName:{name:"billTypeName",type:"String",label:""},orderDate:{name:"orderDate",type:"Date",label:""},state:{name:"state",type:"String",label:""},status:{name:"status",type:"String",label:""},captionNo:{name:"captionNo",type:"String",label:""},captionName:{name:"captionName",type:"String",label:""},captionFullID:{name:"captionFullID",type:"String",label:""},captionFullNo:{name:"captionFullNo",type:"String",label:""},captionFullName:{name:"captionFullName",type:"String",label:""},captionType:{name:"captionType",type:"String",label:""},captionTypeLabel:{name:"captionTypeLabel",type:"String",label:""},settleCategory:{name:"settleCategory",type:"String",label:""},settleCategoryLabel:{name:"settleCategoryLabel",type:"String",label:""},dob:{name:"dob",type:"Integer",label:""},dobLabel:{name:"dobLabel",type:"String",label:""},amountL:{name:"amountL",type:"Decimal",label:""},nodeLevel:{name:"nodeLevel",type:"Integer",label:""},nodeKind:{name:"nodeKind",type:"String",label:""},sortNo:{name:"sortNo",type:"String",label:""},fParent:{name:"fParent",type:"String",label:""},comments:{name:"comments",type:"String",label:""},cUsercode:{name:"cUsercode",type:"String",label:""},cUsername:{name:"cUsername",type:"String",label:""},cDatetime:{name:"cDatetime",type:"Datetime",label:""},tUsercode:{name:"tUsercode",type:"String",label:""},tUsername:{name:"tUsername",type:"String",label:""},tDatetime:{name:"tDatetime",type:"Datetime",label:""},eUsercode:{name:"eUsercode",type:"String",label:""},eUsername:{name:"eUsername",type:"String",label:""},eDatetime:{name:"eDatetime",type:"Datetime",label:""},userId:{name:"userId",type:"String",label:""},enterpriseNo:{name:"enterpriseNo",type:"String",label:""},enterpriseName:{name:"enterpriseName",type:"String",label:""},version:{name:"version",type:"Integer",label:""}};
   		options.isTree = true;
   		options.parentRelation = 'fParent';
   		options.nodeKindRelation = 'nodeKind';
   		options.nodeLevelRelation = 'nodeLevel';
   		options.nodeSortRelation = "sortNo";
//   	options.rootFilter = 'AccountCaption.fParent is null';
   		options.pathRelation = 'captionFullID';
   		options.directDeleteMode = false;
   		options.limit = -1;
   		options.orderBy = 'sortNo ASC';
   		
   		Model.dataMaster = new BizData(options);

  		Model.dataMaster.refreshData();
		
	    return Model;

	}	
	
